package com.top.art.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.top.art.entity.ExamDist;
import com.top.art.mapper.ExamDistMapper;
import com.top.art.service.IExamDistService;
import com.top.art.tool.AuthTool;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @description:
 * @author: huangyixin
 * @create: 2020/10/11 17:20
 **/
@Slf4j
@Service
public class ExamDistServiceImpl extends ServiceImpl<ExamDistMapper, ExamDist> implements IExamDistService {

    @Override
    public Boolean create() {
        String account = AuthTool.currentUser().getAccount();
        ExamDist dist = new ExamDist();
        dist.setDistributor(account);
        dist.setDisTime(new Date());
        return this.save(dist);
    }
}
